//
//  HomePageCollectionCell.m
//  WorkNest
//
//  Created by qbm360 on 15/7/7.
//  Copyright (c) 2015年 nest. All rights reserved.
//

#import "HomePageCollectionCell.h"
#import "UIImageView+AFNetworking.h"

@interface HomePageCollectionCell ()

@property (weak, nonatomic) IBOutlet UIImageView *image;
@property (weak, nonatomic) IBOutlet UILabel *price;
@property (weak, nonatomic) IBOutlet UILabel *sellCount;
@property (weak, nonatomic) IBOutlet UILabel *designerId;
@property (weak, nonatomic) IBOutlet UILabel *productName;

@end

@implementation HomePageCollectionCell

- (void)awakeFromNib {
}

- (void)setModel:(ProductModel *)model {
    _model = model;
    [self.image setImageWithURL:[NSURL URLWithString:[UIUtil containString:_model.mainImage]] placeholderImage:[UIImage imageNamed:@"tupian"]];
    self.price.text = _model.quotation;
    self.sellCount.text = [NSString stringWithFormat:@"热销:%@",_model.bookedQuantity];
    self.designerId.text = [NSString stringWithFormat:@"设计师ID:%@",_model.designerId];
    self.productName.text = _model.productName;
}

@end
